package cz.schovjan.proj.dto;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;

/**
 * Trida reprezentuje kapelu.
 * @author schovjan
 *
 */
public class Band implements Serializable {

	private static final long serialVersionUID = 1L;

	private Integer id;
	
	@NotBlank(message="Název nesmí být prázdný.")
	@Size(max=50, message="Název má max. 50 znaků.")
	private String name;
	
	@Size(max=200, message="Popis má max. 200 znaků.")
	private String description;
	
	@Size(max=50, message="Email má max. 50 znaků.")
	private String email;
	
	@DateTimeFormat(iso=ISO.DATE)
	private Date creation;
	
	@DateTimeFormat(iso=ISO.DATE)
	private Date breakup;
	
	private List<Member> members;
	private List<Concert> concerts;
	private List<Song> songs;
	

	public Band() {
	}
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Date getCreation() {
		return creation;
	}

	public void setCreation(Date creation) {
		this.creation = creation;
	}

	public Date getBreakup() {
		return breakup;
	}

	public void setBreakup(Date breakup) {
		this.breakup = breakup;
	}

	public List<Member> getMembers() {
		return members;
	}
	
	public void setMembers(List<Member> members) {
		this.members = members;
	}
	
	public List<Concert> getConcerts() {
		return concerts;
	}
	
	public void setConcerts(List<Concert> concerts) {
		this.concerts = concerts;
	}
	
	public List<Song> getSongs() {
		return songs;
	}
	
	public void setSongs(List<Song> songs) {
		this.songs = songs;
	}

	@Override
	public String toString() {
		return "Band [id=" + id + ", name=" + name + ", description="
				+ description + ", email=" + email + ", creation=" + creation
				+ ", breakup=" + breakup + "]";
	}
	
}
